package com.example.logback;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.example.baudusdk.DataEx;

/**
 * @author: zouren
 * @date: 2021/5/29
 * @description:
 */
public class DataExListener extends AnalysisEventListener<Log> {

    @Override
    public void invoke(Log data, AnalysisContext context) {
        String emp =  data.getExceptionMsg();
        if(emp!=null&&emp.length()>30000){
            data.setExceptionMsg(emp.substring(0,30000));
        }

    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }
}
